
<div class="cart_list_t">产品清单<span class="search" style="text-indent:0"><input type="text" placeholder="产品名称" id="tbxsearch" style="height:23px"/><a id="btnsearch" href="javascript:void();">搜索</a></span></div>
{if $arrayCarInfos==false || $arrayCarInfos == ''} <br />
您的购物车中暂无商品信息，请<strong><a href="index.php" class="a1">选择</a>！</strong> <br />
{else}
<table class="cart_table">
  <thead>
    <tr>
      <!-- <td>选择</td> -->
      <td>产品名称</td>
      <td>版本</td>
      <td>授权方式</td>
      <td>订购价(&yen;)</td>
      <td>订数量</td>
      <td>订金额(&yen;)</td>
	  
    </tr>
  </thead>
  <tbody>
  
  {section name=cbID loop=$arrayCarInfos}
  <tr>
    <!-- <td><input type="checkbox"></td> -->
    <td class="cart_name"><a href="details.php?pid={$arrayCarInfos[cbID].id}" target="_blank">{$arrayCarInfos[cbID].name}</a></td>
    <td>{$arrayCarInfos[cbID].version}</td>
    <td>{$arrayCarInfos[cbID].license}</td>
    <td>{$arrayCarInfos[cbID].price}</td>
    <td><input type="text" class="cart_num" id="num_{$arrayCarInfos[cbID].id}" value="{$arrayCarInfos[cbID].num}" onblur="javascript:goupdate({$arrayCarInfos[cbID].id});" ></td>
    <td>{$arrayCarInfos[cbID].smallTotalPrice}</td>
    
  </tr>
  {/section}
    </tbody>
  
</table>
{/if}
<p class="cart_tip"><a class="cart_del" href="javascript:if(window.confirm('确定要项目归零？')==true){ldelim}window.location.href='quickbuy.php?t=clearAll';{rdelim}">清单归零</a><span>运费：<i>免费送货 运费 0 元</i></span></p>
<p class="cart_count">总计：<i>&yen;{$totalPrice}</i></p>
<div class="cart_ctrl">如有问题，欢迎随时致电：020-87509004<a href="index.php" class="btn_continue">继续购物</a><a href="{if $arrayCarInfos==false || $arrayCarInfos == ''}javascript:alert('请选择商品，然后提交订单！'); {else}confirm.php{/if}" class="btn_xiadan">在线下单</a></div>

<script type="text/javascript">
	function goupdate(id)
	{
		var numedit = $("#num_"+id).val();
		window.location.href="quickbuy.php?upid="+id+"&num="+numedit+"&t=update";
	}
	
	var carts = new Array();
	$(".cart_name").each(function(){
		var $tr = $(this).closest("tr");
		var cart_name = $(this).text();
		carts[cart_name] = $tr;
	});
	$('#btnsearch').click(function(){
		search($('#tbxsearch').val());
	})
	function search(keyword){
		for (var k in carts){
			if (k.indexOf(keyword) < 0) {
				 $(carts[k]).hide();
			}else{
				$(carts[k]).show();
			}
		}
	}

</script>
